import {ChangeCollapsed} from "../constant";

export const CollapsedReducer = (preState={
    isCollapsed:false
},action) =>{
    let {type} =action
    switch(type) {
        case ChangeCollapsed:
            let newsState = {...preState}
            newsState.isCollapsed = !newsState.isCollapsed
            return newsState
        default:
            return preState
    }
}